package com.nineclock.sign.controller;

import com.nineclock.common.entity.Result;
import com.nineclock.sign.CurrentUserByMonthApi;
import com.nineclock.sign.dto.SignDTO;
import com.nineclock.sign.service.SignUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
public class SignUserController implements CurrentUserByMonthApi {
    @Autowired
    SignUserService signUserService;
    @Override
    @GetMapping("/pagingSignCurrentUserByMonth")
    public Result<List<SignDTO>> CurrentUserByMonth(@RequestParam("dateStr") String dateStr) {
        List<SignDTO> signDTOList = signUserService.CurrentUserByMonth(dateStr);
        return Result.success(signDTOList);
    }
}
